package com.admin.demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

@Controller
@RequestMapping("/demo")
public class DemoController {

    @Autowired
    MQSender sender;

    @RequestMapping("/mq")
    @ResponseBody
    public Map<String,Object> mq() {
        Map<String,Object> result =new HashMap<>();
        sender.send("hello,imooc");
        result.put("result","success");
        return result;
    }
}

